import request from './request'

// 获取角色列表
export const getCharacters = () => {
    return request.get('/api/voice-chat/characters')
}

// 获取角色详情
export const getCharacterDetail = (characterId: string) => {
    return request.get(`/api/voice-chat/characters/${characterId}`)
}

// 文本转语音
export const textToSpeech = (characterId: string, data: any) => {
    return request.post(`/api/voice-chat/tts/${characterId}`, data)
}

// 语音转文字
export const speechToText = (characterId: string, data: any) => {
    return request.post(`/api/voice-chat/stt/${characterId}`, data)
}

// 上下文聊天
export const contextChat = (data: any) => {
    return request.post(`/api/doubao/chat/context`, data)
}